package com.efast.dmom.equipment.statemach.handler.maintain;

import com.alibaba.fastjson.JSONObject;
import com.efast.cafe.commponent.statemach.annotation.StatemachHandle;
import com.efast.cafe.commponent.statemach.base.HandleBaseProcessorService;
import com.efast.dmom.equipment.bean.EquipMaintainItemParsmBean;
import com.efast.dmom.equipment.service.maintain.IEquipMaintainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@StatemachHandle(handleName="complete",configId=1020,entityName ="equipMaintainItems")
public class EquipMaintainItemsExecHandler implements HandleBaseProcessorService<EquipMaintainItemParsmBean> {

    @Autowired
    private IEquipMaintainService iEquipMaintainService;
    @Override
    public void process(JSONObject taskBean, EquipMaintainItemParsmBean bean, Map<String,JSONObject> map) {
        //批量更新保养项
        iEquipMaintainService.updateMaintainOrderItems(bean);
    }
}
